<template>
  <mt-header title="HOME">
    <router-link to="/" slot="right">
      <mt-button >{{x()}}</mt-button>
    </router-link>
  </mt-header>
</template>

<script>
  import { Header } from 'mint-ui';
  export default {
    name: "HomeHeader",
    data:function () {
      return {
      }
    },
    components:{
      MtHeader:Header,
    },
    methods:{
      x(){
        console.log('HomeHeader部分开始=============');
        console.log(this.$store.state.userName);
        console.log('HomeHeader部分结束=============');
        return this.$store.state.userName;
      }
    }
  }
</script>

<style scoped>

</style>
